//
// Copyright (c) 2024 BPergaofeng
//
#ifndef SRC_BPerPUSH_BPerSENDVIDEOIMPL_H_
#define SRC_BPerPUSH_BPerSENDVIDEOIMPL_H_

#include <bperutil/buffer/BPerVideoBuffer.h>
#include <bperavutil/video/BPerYuvConvert.h>
#include <bperpush/BPerSendVideoI.h>

class BPerSendVideoImpl : public BPerSendVideoI {
public:
    BPerSendVideoImpl();

    virtual ~BPerSendVideoImpl();

    void putVideoRgba(uint8_t *data, int len, int64_t timestamp);

    void putVideoI420(uint8_t *data, int len, int64_t timestamp);

    void init(int32_t wid, int32_t hei);

    BPerVideoBuffer *m_outPreVideoBuffer;
    BPerVideoBuffer *m_outVideoBuffer;
private:
    BPerYuvConvert m_yuv;
    BPerFrame m_videoFrame;
    uint8_t *m_buf;

    int32_t m_width;
    int32_t m_height;
    int32_t m_len;


};

#endif /* SRC_BPerPUSH_BPerSENDVIDEOIMPL_H_ */
